Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial attempts to automatically clean up dangling hosts #337

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JacobCallahan
Copy link
Member

@JacobCallahan JacobCallahan commented Nov 19, 2024

Now, when workflows fail, Broker will attempt to find a dangling host and check it in if found.

@JacobCallahan JacobCallahan added the enhancement New feature or request label Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no suggestions.

Comments skipped due to low confidence (2)

broker/providers/ansible_tower.py:381

  • Check for the existence of 'node.summary_fields["job"]' and 'node.summary_fields["job"]["failed"]' before accessing them to avoid potential KeyError.
if node.summary_fields["job"]["failed"]:

broker/providers/ansible_tower.py:388

  • Ensure that 'job' is not None before proceeding to avoid potential AttributeError.
def _try_checkin_dangling_host(self, job):
@JacobCallahan JacobCallahan marked this pull request as ready for review November 26, 2024 13:33
@JacobCallahan JacobCallahan marked this pull request as draft November 26, 2024 21:05

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 4 out of 4 changed files in this pull request and generated no suggestions.

Comments skipped due to low confidence (1)

broker/config_manager.py:102

  • The condition 'and "example" not in module.name' could be more specific to avoid false positives.
if hasattr(module, "run_migrations") and "example" not in module.__name__:
Now, when workflows fail, Broker will attempt to find a handgling host
and check it in if found.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant